﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>生成二维码</title>
    <script src="../jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.qrcode.js" type="text/javascript"></script>
    <script src="js/qrcode.js" type="text/javascript"></script>
    <style type="text/css">
    div
    {
        border:1px solid #333;
        margin:3px;
        padding:5px;
    }
    </style>
</head>
<body>
<div>
    <h3>调用Google API生成</h3>
    <script type="text/javascript">
        document.write("<img src='https://chart.googleapis.com/chart?cht=qr&chs=150x150&chl=" + encodeURIComponent(document.location.href) + "' alt='QR' />"); 
    </script> 
</div>

<div>
    <h3>绘制table</h3>
    <p id="qrcodeTable"></p>
    <script>
        jQuery('#qrcodeTable').qrcode({
            render: "table",
            text: "http://jetienne.com"
        });
    </script>
</div>

<div>
<h3>绘制canvas</h3>
<p id="qrcodeCanvas"></p>
<script>
    jQuery('#qrcodeCanvas').qrcode({
        text: "http://jetienne.com"
    });	
</script>
</div>





</body>
</html>
